home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / cat2 / fxattr.nr < prev    next >
Encoding:
Text File  |  1993-03-03  |  4.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. Fxattr(2)                  Oct. 1, 1991                 Fxattr(2)
  5.  
  6.  
  7. N✓NA✓AM✓ME✓E
  8.        Fxattr - get extended attributes for a file
  9.  
  10. S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
  11.        #include <filesys.h>
  12.  
  13.        LONG Fxattr( WORD flag, char *name, XATTR *xattr );
  14.  
  15. D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
  16.        _✓F_✓x_✓a_✓t_✓t_✓r  gets  file  attributes for the file named _✓n_✓a_✓m_✓e and
  17.        stores them in the structure pointed to  by  _✓x_✓a_✓t_✓t_✓r.   This
  18.        structure  is  defined in the file filesys.h, and contains
  19.        the following fields of interest:
  20.  
  21.        unsigned short mode
  22.               This field gives the file type and  access  permis-
  23.               sions;  (mode & S_IFMT) gives the file type (one of
  24.               S_IFCHR,  S_IFDIR,  S_IFREG,  S_IFIFO,  S_IMEM,  or
  25.               S_IFLNK);  (mode  &  ~S_IFMT) gives the file access
  26.               mode according to the POSIX standard. See filesys.h
  27.               for  the definitions and meanings of the constants.
  28.  
  29.        long index
  30.               An index for the  file.  Together  with  the  "dev"
  31.               field,  this  is  intended  to give a unique way of
  32.               identifying the file. Note, however, that  not  all
  33.               file  systems  are able to support this meaning, so
  34.               it is best not to use this field unless  absolutely
  35.               necessary.
  36.  
  37.        unsigned short dev
  38.               The  device number for the file. This may be a BIOS
  39.               device number as passed to the _✓R_✓w_✓a_✓b_✓s  function,  or
  40.               it  may  be  a  device number concocted by the file
  41.               system to represent a remote device.
  42.  
  43.        unsigned short nlink
  44.               Number of hard links to  the  file.  Normally  this
  45.               field will be 1.
  46.  
  47.        unsigned short uid
  48.               The user id of the owner of the file.
  49.  
  50.        unsigned short gid
  51.               The group id of the owner of the file.
  52.  
  53.        long size
  54.               The length of the file, in bytes.
  55.  
  56.        long blksize
  57.               The size of blocks on this file system.
  58.  
  59.        long nblocks
  60.               The  number of physical blocks occupied by the file
  61.  
  62.  
  63.  
  64. Version 0.9          MiNT Programmer's Manual                   1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. Fxattr(2)                  Oct. 1, 1991                 Fxattr(2)
  71.  
  72.  
  73.               on the disk; this count includes  any  blocks  that
  74.               have been reserved for the file but do not yet have
  75.               data in them, and any blocks that the  file  system
  76.               uses  internally  to  keep track of file data (e.g.
  77.               Unix indirect blocks).
  78.  
  79.        short mtime
  80.               The time of the last modification to the  file,  in
  81.               standard GEMDOS format.
  82.  
  83.        short mdate
  84.               The date of the last modification, in standard GEM-
  85.               DOS format.
  86.  
  87.        short atime, adate
  88.               The time and date of the last access to  the  file,
  89.               in  GEMDOS  format.   Filesystems  that do not keep
  90.               this time will return the values given  in  "mtime"
  91.               and "mdate" for these fields as well.
  92.  
  93.        short ctime, cdate
  94.               The time and date of the file's creation, in GEMDOS
  95.               format.  Filesystems that do  not  keep  this  time
  96.               will return the values given in "mtime" and "mdate"
  97.               for these fields as well.
  98.  
  99.        short attr
  100.               The  standard  TOS  attributes  for  the  file,  as
  101.               returned by _✓F_✓a_✓t_✓t_✓r_✓i_✓b and/or _✓F_✓s_✓f_✓i_✓r_✓s_✓t.
  102.  
  103.        The  _✓f_✓l_✓a_✓g parameter controls whether or not symbolic links
  104.        should be followed. If it is 0, then  symbolic  links  are
  105.        followed (like the Unix _✓s_✓t_✓a_✓t function). If _✓f_✓l_✓a_✓g is 1, then
  106.        links are not followed and the information returned is for
  107.        the  symbolic link itself (if the named file is a symbolic
  108.        link); this behavior is like that of the Unix _✓l_✓s_✓t_✓a_✓t system
  109.        call.
  110.  
  111. R✓RE✓ET✓TU✓UR✓RN✓NS✓S
  112.        0 on success
  113.  
  114.        EFILNF if the file is not found
  115.  
  116.        EPTHNF if the path to the file is not found.
  117.  
  118. S✓SE✓EE✓E A✓AL✓LS✓SO✓O
  119.        _✓F_✓a_✓t_✓t_✓r_✓i_✓b(2), _✓F_✓s_✓n_✓e_✓x_✓t(2)
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. Version 0.9          MiNT Programmer's Manual                   2
  131.  
  132.  
  133.